package com.landiao.ctrler.management;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.landiao.ctrler.BaseCRUDCtrler;
import com.landiao.entities.SysConfig;
import com.landiao.service.SysConfigService;

/**
 * 功能说明:系统配置
 *
 */
@Controller
@RequestMapping("/management/sysconfig")
public class SysConfigCtrler extends BaseCRUDCtrler<SysConfig, String> {

	private SysConfigService getSysConfigService() {
        return (SysConfigService) baseService;
    }
	
	/**
	 * 验证是否存在
	 * 
	 */
	@RequestMapping("isExist")
	@ResponseBody
	public boolean isExist(SysConfig record) {
		SysConfig sys = this.getSysConfigService().getOneBySysConfig(record);
		if (sys == null) {
			return true;
		}else{
			return false;
		}
	}
}
